import 'package:flutter/material.dart';
import 'package:flutter_demo/route/RouteUtils.dart';
import 'package:flutter_demo/route/routes.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {

    // 这里包裹起来之后就会进行初始化
    return ScreenUtilInit(
      designSize: const Size(1080, 547),
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          useMaterial3: true,
          colorScheme: ColorScheme.fromSeed(
            seedColor: Colors.lightBlue
          ),
        ),
        navigatorKey: RouteUtils.navigatorKey,
        onGenerateRoute: Routes.generateRoute,
        initialRoute: RoutePath.homne,
        // home: const Scaffold(
        //   resizeToAvoidBottomInset: true,
        //   body: HomePage()
        // ),
      ),
    );
  }
}
